//全部状态
import React, { Component } from 'react';
import {
    View,
} from 'react-native';

import { mestateStyle as styles } from '../../../../styles';
import Mestate_tou from './mestate_tou';
import Mestate_cha from './mestate_cha';
import Mestate_yao from './mestate_yao';
import Mestate_bu from './mestate_bu';


export default class Mestate extends Component {

    constructor(props) {            //构造器只执行一次
        super(props);
    };

    render() {
        return (
            <View style={styles.mesta_list}>
                {this.props.postionSend.sendState == 0 ?
                    <Mestate_tou postionSend={this.props.postionSend} /> :
                    this.props.postionSend.sendState == 1 ?
                        <Mestate_cha postionSend={this.props.postionSend} /> :
                        this.props.postionSend.sendState == 2 ?
                            <Mestate_yao postionSend={this.props.postionSend} /> :
                            this.props.postionSend.sendState == 3 ?
                                <Mestate_bu postionSend={this.props.postionSend} /> : null}
            </View>
        )
    }
}
